//
// CleanerScoreScene class
//
var LoadingLayer = function () {
    cc.log("LoadingLayer")
};

LoadingLayer.prototype.onDidLoadFromCCB = function () {
//    this.rootNode.onUpdate = function (dt)
//    {
//        this.controller.onUpdate();
//    };
//    this.rootNode.schedule(this.rootNode.onUpdate);

    if (sys.platform == 'browser') {
        this.onEnter();
    }
    else {
        this.rootNode.onEnter = function () {
            this.controller.onEnter();
        };
    }

    this.rootNode.onExit = function () {
        this.controller.onExit();
    };
};

LoadingLayer.prototype.onEnter = function () {
    cc.SpriteFrameCache.getInstance().addSpriteFrames("res/sprites/icons.plist");
    cc.SpriteFrameCache.getInstance().addSpriteFrames("res/sprites/gui.plist");
    cc.AnimationCache.getInstance().addAnimations("res/sprites/anims.plist");
    cc.TextureCache.getInstance().addImage("res/gezi.png");
    cc.TextureCache.getInstance().addImage("res/mainbg.png");
    cc.TextureCache.getInstance().addImage("res/title.png");
    cc.TextureCache.getInstance().addImage("res/xm.png");

    cc.BuilderReader.runScene("", "StartLayer");
}

LoadingLayer.prototype.onUpdate = function () {

}

LoadingLayer.prototype.onExit = function () {

}
